{% extends "layout.html" %}
{% block body %}
<div class="page-header">
  <ul class="breadcrumb">
    <li><a href="/">Home</a></li>
    <li class="active">Account Page</li>
  </ul>
  <h3 id="containers">Welcome, {{ g.user.email }}</sub></h3>
</div>
      
<div class="account">
  <div class="col-lg-3">
    {% include 'account_navbar.html' %}
  </div>

  <div class="col-lg-9">
    <div class="panel panel-default account-pannel">
      <div class="panel-heading">
        <h3 class="panel-title"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
         Dashboard
        </h3>
      </div>
      <div class="panel-body">
        <li><strong>Realname:</strong> {{ g.user.realname }}</li>
        <li><strong>Favorite Book:</strong> <span class="label label-info">{{ favorites }}</span></li>
        <li><strong>Last Read:</strong>
          {% if last_read %}
          <a href="{{ url_for('book', id=last_read.book_id) }}">
            <strong>{{ last_read.en_title }}</strong>
          </a>
          <a href="{{ url_for('book_chapter', book_id=last_read.book_id, chapter_id=last_read.chapter_id) }}">
            <em>{{ last_read.en_name or 'None Chapter' }}</em>
          </a>
          - {{ last_read.addtime|strftime }}
          {% endif %}
        </li>
        <li><strong>Last Comment:</strong>
          {% if last_comment %}
          <a href="{{ url_for('book', id=last_comment.book_id) }}">
            <strong>{{ last_comment.en_title }}</strong>
          </a>
          - {{ last_comment.addtime|strftime }}
          {% endif %}
        </li>
        <li><strong>Register:</strong> {{ g.user.addtime|strftime }}</li>
        <li><strong>Last Login:</strong> {{ g.user.logintime|strftime }}</li>
        <li><strong>Login IP: {{ g.user.loginip }}</strong></li>
      </div>
    </div>
  </div>
</div>
{% endblock %}

{% block title %}Account Page - JiangHu Novel{% endblock %}